<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />
        <link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
        <script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
        <script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
        <script type="text/javascript" src="<%=path %>/js/popup.js"></script>
                <script type="text/javascript" src="<%=path%>/js/jquery.min.js"></script>
        <script language="javascript">
		   function save()
		    {
		        var name = document.getElementById('name').value;
		        if(name==null || name==''){
		           alert('请输入名称');
		           return;
		        }
		        document.formAdd.submit();
		    }
		    
		    
		     function changeSelect(){
		        var fids = $("#fid").val();
		        if(fid!=0){
		            $.post("<%=path%>/getJigouList.action", { fid: fids},
					   function(data){
					         var datas = eval(data);
					         $("#jgid").empty();
					         $("#jgid").append("<option value='0'>请选择</option>");
					         for(var i=0;i<datas.length;i++){
					             var jg = datas[i];
					              $("#jgid").append("<option value='"+jg.id+"'>"+jg.name+"</option>");
					         }
					   });
		        }
		    }
        </script>
	</head>

	<body leftmargin="2" topmargin="9" background='<%=path %>/images/allbg.gif'>
			<form action="<%=path %>/banjiEdit.action" name="formAdd" method="post">
				 <input type="hidden" name="id" value="${banji.id}"/> 
				     <table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px">
						<tr bgcolor="#EEF4EA">
					        <td colspan="3" background="<%=path %>/images/wbg.gif" class='title'><span>修改</span></td>
					    </tr>
												
								 <tr align='center' bgcolor="#FFFFFF"
					onMouseMove="javascript:this.bgColor='red';"
					onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
					<td width="25%" bgcolor="#FFFFFF" align="right">
						专业：
					</td>
					<td width="75%" bgcolor="#FFFFFF" align="left">
					  
						<select name="fid" id="fid" onchange="changeSelect();">
						      <option value="0" >请选择</option>
							  <c:forEach items="${jigouList}" var="jg">
							        <option <c:if test="${yx.id == jg.id}">selected</c:if> value="${jg.id}">${jg.name}</option>
							  </c:forEach>
						</select>
						
						<select name="jgid" id="jgid">
						
						    <option value="0" >请选择</option>
							  <c:forEach items="${xlist}" var="jg">
							        <option <c:if test="${banji.zid == jg.id}">selected</c:if> value="${jg.id}">${jg.name}</option>
							  </c:forEach>
						     
						</select>

					</td>
				</tr>		   						
											   
				  				   						
										<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
						    <td width="25%" bgcolor="#FFFFFF" align="right">
						       名称：
						    </td>
						    <td width="75%" bgcolor="#FFFFFF" align="left">	
				 				      				      <input type="text" id="name" name="name"  value="${banji.name}"  maxlength="100"   />
					  				 
				  </td>
						</tr>
				  				   						   
							
					 
						<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
						    <td width="25%" bgcolor="#FFFFFF" align="right">
						        &nbsp;
						    </td>
						    <td width="75%" bgcolor="#FFFFFF" align="left">
						       <input type="button" value="提交" onclick="save()"/>&nbsp; 
						       <input type="reset" value="重置"/>&nbsp;
						    </td>
						</tr>
					 </table>
			</form>
   </body>
</html>